Skip to content

fix(indexing): Memory management improvements#915

Merged
viacheslavkol merged 11 commits intomasterfrom
memory-management-improvements
Mar 19, 2026
Merged

fix(indexing): Memory management improvements#915
viacheslavkol merged 11 commits intomasterfrom
memory-management-improvements

Conversation

@viacheslavkol
Copy link
Copy Markdown
Contributor

@viacheslavkol viacheslavkol commented Mar 5, 2026

Purpose

Reduce memory footprint between postgres data retrieval and elasticsearch indexing

Approach

Remove Entity intermediaries on call number conversion in extractor.
Use separate method in MultiTenantSearchDocumentConverter since reindexing requires less steps.
Remove reference to "_new" from ResourceEvent in SearchDocumentConverter as soon as it's not needed to allow early garbage collection
Remove duplicate conversion from sub resource repositories and optimize map usage.
Fix reindex persisting in InstanceChildrenResourceService to avoid tenant update operation on call numbers
Remove String intermediary in JsonConverter when converting object to bytes
Pass CharacterStream reader from sub-resource repositories to json converter to remove String intermediary while converting "instances" from result set to list of maps

Changes Checklist

  • API Changes: Document any API paths, methods, request or response bodies changed, added, or removed.
  • Database Schema Changes: Indicate any database schema changes and their impact. Confirm that migration scripts were created.
  • Interface Version Changes: Indicate any changes to interface versions.
  • Interface Dependencies: Document added or removed dependencies.
  • Permissions: Document any changes to permissions.
  • Logging: Confirm that logging is appropriately handled.
  • Unit Testing: Confirm that changed classes were covered by unit tests.
  • Integration Testing: Confirm that changed logic was covered by integration tests.
  • Manual Testing: Confirm that changes were tested on local or dev environment.
  • NEWS: Confirm that the NEWS file is updated with relevant information about the changes made in this pull request.

Related Issues

MSEARCH-1184
PERF-1236

@viacheslavkol viacheslavkol self-assigned this Mar 5, 2026
@viacheslavkol viacheslavkol marked this pull request as ready for review March 19, 2026 12:00
@viacheslavkol viacheslavkol requested a review from a team as a code owner March 19, 2026 12:00
@sonarqubecloud
Copy link
Copy Markdown

@viacheslavkol viacheslavkol merged commit 559c87d into master Mar 19, 2026
16 checks passed
@viacheslavkol viacheslavkol deleted the memory-management-improvements branch March 19, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants